<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <meta name="renderer" content="webkit"/> 
    <meta name="force-rendering" content="webkit"/> 
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/> 
    <link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">
    <link rel="stylesheet" type="text/css" href="/static/sea/iconfont.css">
</head>
<body style="background:#fff">
    <div class="hw-header-wrapper">
            <div class="hw-header">
                <div class="hw-header__item--left">
                 用户列表
                </div>
            </div>
    </div>
    <div class="hw-filter-wrapper">
          <div class="hw-filter">
            <form method="GET" action="<?=$url.'?'.$get ?>" id="id-form">
                <div class="default-filter"> 
                    <div class="hw-input-label"> 
                        <div class="form-control">
                            <div class="hw-search-prevent">
                                <input type="text" id="company-name" name="name" class="hw-input" value="<?=isset($_GET['name']) ? $_GET['name'] : '' ?>" placeholder="请输入用户姓名">
                            <button class="search-btn" type="submit"><i class="iconfont"></i></button>
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="role" id="item" value="">
 <div class="filter-switch" data-status="">更多筛选条件<i class="iconfont hw-down">&#xe87a;</i><i class="iconfont hw-up hide">&#xe87b;</i></div>
                </div>

                <div class="filter-detail" style="display: <?=isset($_GET['start_time']) ? 'block' : 'none' ?>">
                    <div class="filter-item">

                        <div class="hw-input-label">
                            <label class="name" for="">创建日期</label>
                            <div class="input-icon-group">
                                <input type="text" id="d4311" name="start_time" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'d4312\')||\'2020-10-01\'}'})" value="<?=isset($_GET['start_time']) ? $_GET['start_time'] : ''?>" placeholder="选择日期" disabled="">
                                <div class="icon-wrapper">
                                    <i class="iconfont"></i>
                                </div>
                            </div>
                        </div>

                        <div class="hw-input-label">
                            <label class="name" for="" style="width: 15px;">至</label>
                            <div class="input-icon-group">
                                <input type="text" id="d4312" name="end_time" onclick="WdatePicker({minDate:'#F{$dp.$D(\'d4311\')}'})" value="<?=isset($_GET['end_time']) ? $_GET['end_time'] : ''?>" placeholder="选择日期" disabled="">
                                <div class="icon-wrapper">
                                    <i class="iconfont"></i>
                                </div>
                            </div>
                        </div>
                        <div class="operate-btns">
                            <button id="reset-filter-btn" class="hw-btn hw-default-btn" type="button"><i class="iconfont"></i>重置</button>
                            <button class="hw-btn"><i class="iconfont"></i>查询</button>
                        </div>
                    </div>
                </div>
            </form>
            </div>
        </div>
        <div class="main-table-wrap">
            <form id="table-form" method="post" action="/Admin/Member/batchExport">
             <input type="hidden" value="" name="id" id="exportid">
                <table cellspacing="0" cellpadding="0" border="0" id="first-table">  
                    <colgroup> 
                        <col class="col-2">
                        <col class="col-4">
                        <col class="col-6">
                        <col class="col-4"> 
                        <col class="col-6">
                        <col class="col-4">
                        <col class="col-10">
                        <col class="col-10">
                                 
                    </colgroup>
                    <thead>
                        <tr> 
                            <th> 
                            序号
                            </th>                            
                            <th>姓名</th>   
                            <th>手机号</th>
                            <th class="hover-th">
                            <span>角色<i class="iconfont">&#xe619;</i></span>
                            <div class="hover-content"> 
                                <ul class="info" data-target="#item" name="" style="z-index:10px;"> 
                                    <li class="list" data-value="1">主持人</li>
                                    <li class="list" data-value="2">摄影师</li>
                                    <li class="list" data-value="3">化妆师</li>
                                    <li class="list" data-value="4">婚礼策划师</li>
                                    <li class="list" data-value="5">设计师</li>
                                    <li class="list" data-value="6">监督师</li>
                                    <li class="list" data-value="7">摄像师</li>
                                </ul>
                            </div>
                            </th>
                            <th>地区</th>                                                    
                            <th>价格</th>
                            <th>
                             创建时间
                            </th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($list as $key => $value): ?>
                            <tr>  
                                <td><?=$key+1 ?></td>
                                <td><?=$value['name'] ?></td>
                                <td><?=$value['phone'] ?></td>
                                <td>
                                <?php 
                                    switch ($value['role']) {
                                        case '1':
                                            echo '主持人';
                                            break;
                                        
                                        case '2':
                                            echo '摄影师';
                                            break;

                                        case '3':
                                            echo '化妆师';
                                            break;

                                        case '4':
                                            echo '婚礼策划师';
                                            break;

                                        case '5':
                                            echo '设计师';
                                            break;

                                        case '6':
                                            echo '督导师';
                                            break;

                                        case '7':
                                            echo '摄像师';
                                            break;

                                        default:
                                            echo '';
                                            break;
                                    }
                                ?>
                                </td>
                                <td><?=$value['area'] ?></td>
                                <td>￥<?=$value['price'] ?></td>
                                <td><?=$value['create_time'] ?></td>
                                <td class="opt">
                                <a class="iconright blue-color delete" href="<?=base_url().'Admin/Member/memberDetail/'.$value['id'] ?>"><i class="iconfont">&#xe6a2;</i>查看详情</a>
                                <?php if ($value['type'] == 0): ?>
                                    <a class="iconright blue-color delete" href="<?=base_url().'Admin/Member/signType/'.$value['id'].'/1' ?>"><i class="iconfont">&#xe613;</i>标记海宝</a>
                                <?php else: ?>
                                    <a class="iconright blue-color delete" href="<?=base_url().'Admin/Member/signType/'.$value['id'].'/0' ?>" style="color:red"><i class="iconfont">&#xe60d;</i>取消标记</a>
                                <?php endif ?>
                                </td>
                            </tr>
                        <?php endforeach ?>
                    </tbody>
                </table>
                <?php $this->load->view('Admin/Page/page') ?>
            </form>
            <!--列表分页 -->
        </div>
<script type="text/javascript" src="/static/lib/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="/static/lib/jquery.form.min.js"></script>
<script type="text/javascript" src="/static/lib/jquery.validate.js"></script>
<script type="text/javascript" src="/static/lib/messages_zh.js"></script>
<script type="text/javascript" src="/static/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/static/js/common/util.js"></script>
<script type="text/javascript" src="/static/js/common/common.js"></script>
<script>
$(".export").click(function(){
    var checked=$(":checked")
    var arr=[]
    for(var i=0;i<checked.length;i++){
        if($(checked[i]).attr("data-id")!=null){
         arr.push($(checked[i]).attr("data-id"))
        }
    }
    if(arr.length==0){
        $.alert("请选择")
        return false
    }
        $.confirm({
        msg:"<i class='iconfont' style='color:#eac149;margin-right:5px;''>&#xe640;</i>确定批量导出?",
        confirm:function(){
        $("#exportid").val(arr);
        $("#table-form").submit()
        }
    })

})


</script>
</body>
</html>